package com.bestcem.xm.txtanls.grpc.service.param.keyword;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author liheng
 * @version v1.0
 * @date 2021/5/12-11:14
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateKeywordParam {

    /**
     * 文本分析项目id
     */
    @NotBlank(message = "分析项目id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "项目id格式错误")
    @JsonProperty(value = "project_id")
    private String projectId;


    /**
     * 关键词
     */
    @NotBlank(message = "关键词不能为空")
    private String keyword;

    /**
     * 显示关键词状态，关键词屏蔽状态枚举
     *
     * @see com.bestcem.xm.txtanls.enums.KeywordOperationEnum
     */
    @Max(value = 1L, message = "关键词状态值非法")
    private int status;


}
